<template>
    <div class=''>

        <br>
        <nly-container :fluid="true">
            <nly-row col-md="3">
                <nly-col md="2" v-for="(item,index) in file_list" :key="index">
                    <div>
                        <img :src="'http://'+domain+'/'+item.key" :alt="index" class="image-item" v-if="item.mimeType!='video/mp4'">
                        <video :src="'http://'+domain+'/'+item.key" :alt="index" class="image-item" v-if="item.mimeType=='video/mp4'" controls></video>
                    </div>
                </nly-col>
            </nly-row>
        </nly-container>
    </div>
</template>

<script>
    import apis from '@/api/file';
    export default {
        name: '',
        data() {
            return {
                domain: "",
                bucket: '',
                file_list: []
            }
        },
        created() {
            apis.pull_list().then(response => {
                if (response.data.code == 0) {
                    this.file_list = response.data.data.list;
                    this.domain = response.data.data.domain;
                }
            });
        },
        methods: {
            mimeType() {

            }
        },
        components: {

        }
    }
</script>

<style>
    .image-item {
        width: 150px;
        height: 150px;
        border: 1px solid #1e1e1e;
        margin: 10px;
    }
</style>